/**
 * 管理OrderAdd页面的共享数据
 */
 const orderAdd = {
	namespaced: true,
	state: {
		xCustModel: {},
		xCustManageModel: {
			custManagerId: "",
			custManageName: "",
		},
		xBusiManageModel: {
			busiManagerId: "",
			busiManageName: "",
		},
		xProjectModel: {
			projectId: "",
			projectName: "",
			projectManage: "",
			projectManageName: "",
			bussDesc: "",
		},
		xContactModel: {
			contactId: "",
			contactCd: "",
			contactName: "",
			contactNumberType: "",
		},
		xSaleModel: {
			saleId: "",
			saleName: "",
		},
		xOrderModel: {
			custOrderId: "",
			custSoNumber: "",
			isCountyFlag: "",
			oneSubFlag: "",
			orderSourceId: "",
			remark: "",
		},
	},

	mutations: {
		SET_XCUSTMODEL: (state, value) => {
			state.xCustModel = value;
		},
		SET_XCUSTMANAGEMODEL: (state, value) => {
			state.xCustManageModel = value;
		},
		SET_XBUSIMANAGEMODEL: (state, value) => {
			state.xBusiManageModel = value;
		},
		SET_XPROJECTMODEL: (state, value) => {
			state.xProjectModel = value;
		},
		SET_XCONTACTMODEL: (state, value) => {
			state.xContactModel = value;
		},
		SET_XSALEMODEL: (state, value) => {
			state.xSaleModel = value;
		},
		SET_XORDERMODEL: (state, value) => {
			state.xOrderModel = value;
		},
		CLEAR_XMODEL: (state) => {
			// state.xCustModel = {};
			state.xCustManageModel = { custManagerId: "", custManageName: "" };
			state.xBusiManageModel = { busiManagerId: "", busiManageName: "" };
			// state.xProjectModel = {};
			// state.xContactModel = {};
			// state.xSaleModel = {};
			// state.xOrderModel = {};
		},
	},

	actions: {},
};

export default orderAdd;